
<div class="invoice-container">

	<div class="status-<?php echo strtolower($model->status->description); ?> tooble-cursor">
		<div class="tooble">
			<b class="iefix-4"></b>
				Estimate created, but you have not notified your client. <span></span>Your client will not see this estimate if they login.		
		</div>
	</div>
	
	<div class="invheader">
		
		<div class="invheader-upper">		
			<div class="invheader-address-account">
				Jed Danner<br />
				16122 Hwy 51<br />Ariton AL&nbsp;&nbsp;36311<br />United States
			</div>

			<div class="invheader-logo-container">
				<div class="invheader-logo">
					<!-- <img src="/logo.php/invoice.v1299677093" width="100" height="100" alt="" /><br /> -->
				</div>
			</div>
		</div>
		<br/>
		<br/>
		<table style="padding-left: 0.5in; width: 100%;">
		<tr>
			<td>
			<div class="invheader-address-client">
				<strong>Location:</strong><br/>
				<?php echo $model->location->code; ?> - <?php echo $model->location->description; ?>
			</div>
			</td>
			<td align="right">
			<div class="invheader-invoicedetails"">
				<table cellspacing="0">
					<tr>
						<th>WO #</th>
						<td><?php echo $model->wo_number; ?></td>
					</tr>
					<tr>
						<th>Start Date</th>
						<td><?php echo $model->start_date; ?></td>
					</tr>
					<tr>
						<th>Required By</th>
						<td><?php echo $model->required_by; ?></td>
					</tr>			
				</table>
			</div>
			</td>
		</tr>
	</table>

	</div>
	
	
	
	<div class="invbody">
		<table class="invbody-items" style="cellspacing: 0;" cellspacing="0">
			<thead>
				<tr>
					<th class="first"><div class="item">Item</div></th>
					<th><div>Description</div></th>
					<th><div class="unitcost">Qnty Required</div></th>
					<th><div class="quantity">Qnty Received</div></th>
					<th class="last"><div class="linetotal">Balance</div></th>
				</tr>
			</thead>
			<tbody>
				<?php 
				foreach ($line_items as $line_item) : 
					$cost = $line_item->item->getCost();
					
				?>
				<tr>
					<td style="width: 120px;"><div class="item"><?php echo $line_item->item->code; ?></div></td>
					<td><div><?php echo $line_item->item->short_description; ?></div></td>
					<td style="width: 90px;"><div class="unitcost"><?php echo number_format($line_item->quantity_required, Yii::app()->user->getState('amount_decimals')); ?></div></td>
					<td style="width: 90px;"><div class="quantity"><?php echo number_format($line_item->quantity_received, Yii::app()->user->getState('quantity_decimals')); ?></div></td>
					<td style="width: 90px;"><div class="linetotal"><?php echo number_format($line_item->balance, Yii::app()->user->getState('amount_decimals')); ?></div></td>
				</tr>	
				<?php endforeach; ?>	
			</tbody>	
		</table>
		
		<div class="clearb" style="height: 1px; overflow: hidden;"></div>

	</div>
</div>

<div class="clearb"></div>